import request from '@/utils/request';

// 在线沟通

// 查询列表
export function getChatUsers(data) {
  return request({
    url: '/chatHistory/getSocketList',
    method: 'get',
    params: data,
  });
}
// 查询聊天记录
export function getChatHistory(data) {
  return request({
    url: '/chatHistory/getList',
    method: 'get',
    params: data,
  });
}
// 查看
export function getDataInfo(id) {
  return request({
    url: `/role/info/${id}`,
    method: 'get',
  });
}
// 新增 & 修改
export function savaDataInfo(data) {
  return request({
    url: `/role/${!data.roleId ? 'save' : 'update'}`,
    method: 'post',
    data: data,
  });
}